package com.example.graphql_mybatis_demo.dto

import com.alibaba.fastjson.JSON
import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import java.math.BigInteger


/**
 *@author zhangqiang
 *@date   2019/1/29
 */

@TableName("t_school")
class School(
        @TableId(value = "id",type = IdType.AUTO)
        var id: BigInteger,

        @TableField("c_school_id")
        var schoolId: String = "",

        @TableField("c_school_name")
        var schoolName: String = "",

        @TableField("c_school_age")
        var schoolAge: Int = 0,

        @TableField("c_school_address")
        var schoolAddress: String = ""
) {
    override fun toString(): String {
        return JSON.toJSONString(this)
    }
}